<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>onmouseover</title>
	<style type="text/css">
	#one{width:150px;height:300px;background:lightblue;}
	#two {width:300px;height:40px;border:dashed 3px cyan;margin-top:30px;}
	</style>
</head>
<body>
	<div id ='one'></div>
	<div id ='two'></div>
	<script type="text/javascript">
	//获取元素
	var one =document.getElementById('one');
	var two =document.getElementById('two');
	one.onmouseover =function()
	{
		//alert('讨厌');
	}
	one.onmouseout =function()
	{
		//alert('不要走');
	}

	window.onmousemove =function(e)

	{
		//获取鼠标的x y坐标

		var x = e.clientX;
		var y =e.clientY;

		console.log('X:'+'x'+'===='+y);
	}

	window.onmousemove =function(e)
	{
		//获取数遍的x y标签
		var x = e.clientX;

		var y = e.clientY;

		two.innerHTML = 'X:'+x+'=='+'Y:'+y;

	}
	</script>
	
</body>
</html>